package com.fiberhome.sdmp.xmlcomparator;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

public class ReadCodeOfXmlFile {

	public static void main(String[] args) throws IOException {
		String projectPath = App.class.getProtectionDomain().getCodeSource().getLocation().getPath();
		InputStream is = new FileInputStream(projectPath + "ESO2.unl");
		byte[] buff = new byte[8];
		is.read(buff, 0, 8);

		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < 8; i++) {
			String hex = String.format("%02x ", buff[i] & 0xFF);
			sb.append(hex.toUpperCase());
		}
		System.out.println(" 编码 = " + sb);
	}
}
